import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import './style.css'
import './assets/css/global.css' // 导入全局字体样式

// 配置FontAwesome
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import { 
  faUser, faLock, faEnvelope, faEye, faEyeSlash, 
  faRightToBracket, faUserPlus, faArrowLeft, 
  faTimesCircle, faExclamationCircle, faCheckCircle, faCheck,
  faRightFromBracket, faChevronLeft, faChevronRight, faPlus,
  faEllipsisVertical, faPaperPlane, faRobot, faLightbulb,
  faCode, faGraduationCap, faTimes, faPlusCircle, faUserGear,
  faGear, faBars, faMoon, faSun, faUserCircle, faPaperclip, faArrowUp,
  faBrain, faBolt, faSpinner, faChevronDown, faCopy, faImage, 
  faCalendar, faPen, faTrash, faExclamation, faCircleUser, faEdit,
  // 添加AgentSelector中需要的图标
  faSearch, faThLarge, faStar, faBriefcase, faPaintBrush,
  faBook, faHeart, faUserEdit, faPenFancy, faChartLine, 
  faPlane, faUserAstronaut, faBookmark
} from '@fortawesome/free-solid-svg-icons'

// 导入Regular样式图标
import {
  faComment, faCommentDots, faSun as farSun, faMoon as farMoon
} from '@fortawesome/free-regular-svg-icons'

// 添加图标到库
library.add(
  faUser, faLock, faEnvelope, faEye, faEyeSlash, 
  faRightToBracket, faUserPlus, faArrowLeft,
  faTimesCircle, faExclamationCircle, faCheckCircle, faCheck,
  faRightFromBracket, faChevronLeft, faChevronRight, faPlus,
  faEllipsisVertical, faPaperPlane, faRobot, faLightbulb,
  faCode, faGraduationCap, faTimes, faPlusCircle, faUserGear,
  faGear, faComment, faCommentDots, faBars, faMoon, faSun, faUserCircle,
  faPaperclip, faArrowUp, faBrain, faBolt, faSpinner, faChevronDown,
  farSun, farMoon, faCopy, faImage, faCalendar, faPen, faTrash, faExclamation,
  faCircleUser, faEdit,
  // 添加AgentSelector中需要的图标
  faSearch, faThLarge, faStar, faBriefcase, faPaintBrush,
  faBook, faHeart, faUserEdit, faPenFancy, faChartLine,
  faPlane, faUserAstronaut, faBookmark
)

const app = createApp(App)

// 注册全局组件
app.component('font-awesome-icon', FontAwesomeIcon)

// 使用插件
app.use(createPinia())
app.use(router)

app.mount('#app')
